<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.is.model.ParamCourse"%>
<%@page import="com.is.control.ParamCourseControl"%>
<%
          String courseName = new String(request.getParameter("courseName").getBytes("iso-8859-1"),"UTF-8");
          String courseNameEn = new String(request.getParameter("courseNameEn").getBytes("iso-8859-1"),"UTF-8");
          if(courseNameEn==null||courseNameEn.trim().equals("")){
        	  courseNameEn = "（EMPTY）";
          }
          String grade = new String(request.getParameter("grade").getBytes("iso-8859-1"),"UTF-8");
          int typeId = Integer.parseInt(grade);
          ParamCourse pc = new ParamCourse(courseName,courseNameEn,typeId);
          boolean isSuccess = ParamCourseControl.insertParamCourse(pc);
    	  String returnJson = "{\"status\":\"" + (isSuccess ?  1 : 0) + "\"}";
%>
 <%=returnJson %>